<%@ page import="java.util.Arrays" %><%--
  Created by IntelliJ IDEA.
  User: dailyblue
  Date: 2024/1/21
  Time: 15:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>session对象</title>
</head>
<body>
<%
    // session容器对象 A B C
    session.setAttribute("A", "abc");
    session.setAttribute("B", 8.9);
    session.setAttribute("C", Arrays.asList("aa", "bb", "cc"));
    session.setAttribute("A", "abcd");
    // 删除容器的内容
    session.removeAttribute("B");
    // 获取容器的内容
    Object a = session.getAttribute("A");
    Object b = session.getAttribute("B");
    Object c = session.getAttribute("C");
    out.print(a + "<br/>");
    out.print(b + "<br/>");
    out.print(c + "<br/>");
%>
</body>
</html>